export default {
    state() {
        return {
            id: -1,
            userName: "游客",
            userState: false,
            role: 0
        }
    },
    mutations: {
        update(state, payload) {
            state.userName = payload.userName
            state.userState = payload.userState
            state.role = payload.role
            state.id = payload.id
        },
        reset(state) {
            state.userName = "游客"
            state.userState = false
            state.role = 0
            state.id = -1
        }
    }
}